package com.alstudio.view.viewpagerextend;

import java.util.ArrayList;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

import com.alstudio.app.ALLocalEnv;

public class FixedTabsAdapter implements TabsAdapter {

	private LayoutInflater inflater;

	private ArrayList<String> titles;
	
	private Context context;

	public FixedTabsAdapter(LayoutInflater inflater, ArrayList<String> titles) {
		this.inflater = inflater;
		this.titles = titles;
	}
	
	public FixedTabsAdapter(Context context, ArrayList<String> titles) {
		this.context = context;
		this.titles = titles;
	}


	@Override
	public View getView(int position) {
//		ViewPagerTabButton tab;
//
//		tab = (ViewPagerTabButton) inflater.inflate(R.layout.tab_fixed, null);
//		tab.setLineColor(Color.parseColor("#8a8a8a"));
//		tab.setLineHeight(2);
//		tab.setLineColorSelected(Color.parseColor("#40c2b0"));
//		tab.setLineHeightSelected(2);
//
//		if (position < titles.size())
//			tab.setText(titles.get(position));

		BaseFixedTabView v = new BaseFixedTabView(ALLocalEnv.getLocalEnv());
		if (position < titles.size())
			v.txt.setText(titles.get(position));
//		v.num.setText("1");
//		return tab;
		return v;
	}

}
